package com.org.model;

/**
 * ProductMemberPriceId entity. @author MyEclipse Persistence Tools
 */

public class ProductMemberPriceId implements java.io.Serializable {

	// Fields

	private Product product;
	private MemberRank memberRank;

	// Constructors

	/** default constructor */
	public ProductMemberPriceId() {
	}

	/** full constructor */
	public ProductMemberPriceId(Product product, MemberRank memberRank) {
		this.product = product;
		this.memberRank = memberRank;
	}

	// Property accessors

	public Product getProduct() {
		return this.product;
	}

	public void setProduct(Product product) {
		this.product = product;
	}

	public MemberRank getMemberRank() {
		return this.memberRank;
	}

	public void setMemberRank(MemberRank memberRank) {
		this.memberRank = memberRank;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof ProductMemberPriceId))
			return false;
		ProductMemberPriceId castOther = (ProductMemberPriceId) other;

		return ((this.getProduct() == castOther.getProduct()) || (this
				.getProduct() != null
				&& castOther.getProduct() != null && this.getProduct().equals(
				castOther.getProduct())))
				&& ((this.getMemberRank() == castOther.getMemberRank()) || (this
						.getMemberRank() != null
						&& castOther.getMemberRank() != null && this
						.getMemberRank().equals(castOther.getMemberRank())));
	}

	public int hashCode() {
		int result = 17;

		result = 37 * result
				+ (getProduct() == null ? 0 : this.getProduct().hashCode());
		result = 37
				* result
				+ (getMemberRank() == null ? 0 : this.getMemberRank()
						.hashCode());
		return result;
	}

}